<?php


namespace app\index\validate;


use think\Validate;

class memberSelect extends Validate
{
    protected $rule = [
        'id'=>'require',
        'phone' => 'require|mobile',
        'password' => 'require',
        'newPassword' => 'require',
        'anewPassword' => 'require|confirm:newPassword'

    ];
    protected $message = [
        'id'=>'传入的ID为空',
        'phone' => '手机号不能为空',
        'phone.mobile' => '请填写正确的手机号',
        'password' => '密码不能为空',
        'newPassword' => '请输入新密码',
        'anewPassword' => '请再次输入新密码',
        'anewPassword.confirm' => '两次输出的密码不一致'
    ];

    protected $scene = [
        'member_login' => ['phone','password'],
        'phone' => ['phone'],
        'change_password' => ['password','newPassword','anewPassword']
    ];
}